package com.ww.microrpc.netty;

import org.springframework.beans.factory.annotation.Value;

public class MicroRpcProperties {
    @Value("${micro-rpc.client.port:0}")
    private int clientPort;
    @Value("${server.port}")
    private int webPort;
    @Value("${micro-rpc.server.port:-1}")
    private int port;
    @Value("${micro-rpc.server.ip:0.0.0.0}")
    private String ip;
    @Value("${micro-rpc.server.enabled:true}")
    private boolean enabled;
    @Value("${micro-rpc.client.timeout:3600}")
    private int clientTimeout;
    @Value("${micro-rpc.client.request.timeout:60}")
    private int requestTimeout;

    public int getClientPort() {
        return clientPort;
    }

    public void setClientPort(int clientPort) {
        this.clientPort = clientPort;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public int getWebPort() {
        return webPort;
    }

    public void setWebPort(int webPort) {
        this.webPort = webPort;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public int getClientTimeout() {
        return clientTimeout;
    }

    public void setClientTimeout(int clientTimeout) {
        this.clientTimeout = clientTimeout;
    }

    public int getRequestTimeout() {
        return requestTimeout;
    }

    public void setRequestTimeout(int requestTimeout) {
        this.requestTimeout = requestTimeout;
    }
}
